/***************************************************************
 * Name:      proThread.h
 * Purpose:   Defines Application Frame
 * Author:    walnutcy (walnutcy@gmail.com)
 * Created:   2012-09-14
 * Copyright: walnutcy (weibo.com/walnutcy)
 * License:
 **************************************************************/
#ifndef PROTHREAD_H
#define PROTHREAD_H

#include <wx/Thread.h>
#include <wx/dialog.h>
#include <wx/file.h>
#include "stdef.h"


class proThread : public wxThread
{
    public:
        proThread(wxDialog* pFrm);
        virtual ~proThread();

        // thread execution starts here
        virtual void *Entry();

        // called when the thread exits - whether it terminates normally or is
        // stopped with Delete() (but not when it is Kill()ed!)
        virtual void OnExit();

    protected:
    private:
        wxDialog * p_Frame;

        u8   libASCII2BIN_1(char ch);
        char wxFileReadBYTE(wxFile* pFile, u8* pCH);
        void readTrimble(wxString filePath);
};

#endif // PROTHREAD_H
